package com.example.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @Id
    protected Integer id;
    protected String username;
    protected String password;

    public String toFront() {
        return String.format("{\"username\":\"%s\",\"id\":\"%s\"}", username, id);
    }
}
